package com.leo.train.business.mapper;

import com.github.pagehelper.Page;
import com.leo.train.business.dto.DailyTrainQueryDto;
import com.leo.train.business.entity.DailyTrain;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface DailyTrainMapper {
    void insert(DailyTrain dailyTrain);

    void update(DailyTrain dailyTrain);

    Page<DailyTrain> pageQuery(DailyTrainQueryDto dailyTrainQueryDto);

    DailyTrain selectById(Long id);

    DailyTrain selectByCodeAndDate(String code, Date date);

    void deleteById(Long id);

    List<DailyTrain> selectAll();

    void deleteByTrainCodeAndDate(String code, Date date);
}

